﻿<%@ Page Language="C#" Theme="WebMaster" MasterPageFile="~/WebMaster/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="webapp4U.UI.WebMaster_Default" %>
<%@ Register Src="~/WebMaster/Controls/Title.ascx" TagName="Title" TagPrefix="uc" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register TagPrefix="webapp4U" Namespace="webapp4U.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">

<uc:Title runat="server" ResourceKey='Board_Manager'  />

  <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <contenttemplate>
        
        
    <table align="center" width="700" cellpadding="0" cellspacing="0" border="0" style="table-layout:fixed">
    <tr>
        <td>
            <table width="700" align="center" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td align="left" colspan="2">
                        <a class="linkAdd" href="<%=Globals.ApplicationPath %>WebMaster/Board/BoardAddEdit.aspx"><%=ResourceManager.GetString("AddNew")%></a>
                    </td>                    
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td align="center" style="padding-top:10px;">
            <asp:GridView runat="server" Width="700" 
            ID="GridViewItem" 
            DataSourceID="ItemDataSource"
            AutoGenerateColumns="false" 
            AllowPaging="True" 
            AllowSorting="True" 
            PagerSettings-Mode="NumericFirstLast"
            PageSize="25">
            <Columns>
                 <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20px" HeaderStyle-Width="20px" HeaderText="Delete">
                    <HeaderTemplate>
                        <input id="chkAll" onclick="javascript:SelectAllCheckboxes(this);" runat="server" type="checkbox" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox runat="server" ID="chkSelect" ToolTip='<%# Eval("BoardID") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="Title" 
                    HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign ="left">
                    <HeaderTemplate><%=ResourceManager.GetString("Register_ImageUrl")%></HeaderTemplate>
                    <ItemTemplate>
                            <img alt="" src="<%=Globals.ApplicationPath %>UserUpload/Board/<%# Eval("ImageURL") %>" width="164" height="164"/></td>                            
                    </ItemTemplate>
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="Thông tin" 
                    HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign ="left">
                    <HeaderTemplate><%=ResourceManager.GetString("Information")%></HeaderTemplate>
                    <ItemTemplate>
                           <%# Eval("Information")%>
                    </ItemTemplate>
                </asp:TemplateField>                
                
                <asp:TemplateField ItemStyle-Width="40px" HeaderStyle-Width="40px">
                    <HeaderTemplate><%=ResourceManager.GetString("Edit") %></HeaderTemplate>
                    <ItemTemplate>
                        <a href="BoardAddEdit.aspx?BoardID=<%# Eval("BoardID") %>&Action=Edit">
                            <img src="<%=Globals.ImagesUrlWebMaster() %>Edit.gif" border="0" />
                        </a>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
                                    
            <EmptyDataTemplate>
                <table align="center" width="300" border="0" bordercolorlight="#0099cc"  bordercolor="#0099cc">
                    <tr>
                        <td height="50" align="center">
                            <div align="center" id="EmptyData">Data Empty...</div>
                        </td>   
                    </tr>
                </table>
            </EmptyDataTemplate>
        </asp:GridView>    
        </td>
    </tr>
    <tr>
        <td align="right"><br /><asp:Button runat="server" ID="btDelete" Text=" Delete " OnClick="btDelete_Click" /><br /><br /><br /></td>
    </tr>    
   </table>  
  
  
        </contenttemplate>
    </asp:UpdatePanel>




<asp:ObjectDataSource
        ID="ItemDataSource"
        runat="server"
        SelectMethod="GetAllBoard"
        TypeName="webapp4U.BOL.Board">
</asp:ObjectDataSource>


</asp:Content>

